#!/bin/bash

port=$(netstat -tuln|grep "80")
if [ "$port" != "" ]; then
    echo "www服务正在运行"
fi

port=$(netstat -tuln|grep "22")
if [ "$port" != "" ]; then
    echo "ssh服务正在运行"
fi

port=$(netstat -tuln|grep "21")
if [ "$port" != "" ]; then
    echo "ftp服务正在运行"
fi

port=$(netstat -tuln|grep "25")
if [ "$port" != "" ]; then
    echo "mail服务正在运行"
fi

